Part Number Hot Search : 
38510 A5954 C2405A LCA0411 D1776 CF50603 11N60C 2SC3884
Product Description
Full Text Search
 

To Download AN1113 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  january 1999 introduction brushless dc motors (bldc) are becoming widely used in the field of control motors. these kind of syn- chronous motors are used as servo drives in applications such as computer peripherals equipment, ro- botics, and as adjustable-speed drives in load-proportional capacity-modulated heat pumps, large fans , compressors and so on. brushless dc motors are referred to by many aliases as brushless permanent magnet, permanent ma- gnet ac motors, permanent magnet synchronous motors, etc. the confusion arises because a brush- less motor does not directly operate off a dc voltage source. it is generally driven (supplied) from an in- verter which converts a constant voltage to a 3-phase voltage with a frequency corres ponding instantaneously to the rotor speed. one of the advantages of bldc motor is the sparks absence. the brushes of a dc motor have several problems as regards to brushes life and dust residues, maximum speed and electrical noise. bldc mo- tors are potentially cleaner, faster, more efficient, less noisy and more reliable. however, bldc motors require a more complex electronic control. this application note will show how this complexity can be reduced by using st52x301 fuzzy controller. an outline of brushless motors the brushless motor has the physical appearance of a 3-phase permanent magnet synchronous machi- ne. the brushes and commutator have been eliminated and the windings are connected to the control elec- tronics. electronics replaces the function of the commutator and energizes the proper winding. the ener- gized stator winding leads the rotor magnet and switches just as the rotor aligns with the stator. in synchronous motor drives, the stator is supplied with a set of balanced three-phase currents, whose frequency is f . if p is the number of the poles in the motor, then: f = p 4 p w s (1) where w s (rad/s) is the flux synchronous speed or, that is the same, the rotor speed. this equation links the rotor speed to the phases switching frequency of the electronic drive. the above currents produce a constant amplitude flux f s in the air gap, which rotates at the synchro- nous speed w s . since the flux amplitude is proportional to the current amplitude, it is enough to manage winding current level to control the rotor torque. from brushless theory [3-4] it is possible to demonstrate that t em = k t f f i ph sin (d) (2) where k t is a constant, f f is the field-flux, d is called torque angle. d represents the angle between the phase linked flux f fph1 and the relative stator current i ph1 . AN1113 application note brushless motor fuzzy control by using st52x301 authors: g. grasso, m. di guardo 1/18
now, if the electronic controller is able to supply phase ph1 in order to maintain d =90 the equation abo- ve (2) can be simplified as t em = k t i s (3) where k t is called motor torque constant and i s is the amplitude of the stator phase currents. from the previous considerations it is clear the reason why a bldc motor needs always position sensors to know exactly rotor position. fig. 1 shows a transversal section of a typical three phase brushless motor. figure 1 . three-phase brushless motor figure 2. motor data sheet h1 h2 h3 linked voltage for counterclockwise direction in the diagram, three position sensors (hall sensors) are placed around the rotor in order to detect the shaft position. fig. 2 reports motor data sheet supplied by the motor builder. ? AN1113 - application note 2/18
by observing the motor data sheet, these concepts become clear. in fact, it is possible to see the rela- tion between shaft position, hall sensors response and voltage profile to be supplied. this way to supply the stator phases is very complex because it is necessary to produce a sine wave with a proper period and delay with respect to the sensors information. as we will show later on, a sim- pler method is possible. inverter driver topology the stator of a brushless dc motor is generally supplied by an inverter which converts a dc voltage to a 3-phase ac voltage whose frequency is related to the speed of the rotor. speed control is achieved by a pulse width modulation (pwm) of the phases voltage accomplished by periodically switching the phase voltage to zero. the widely used driver to perform this switching is the six-step inverter where each pha- se is driven by means of a couple of transistors. fig.3 shows the basic operating principle of this drive. the name "six-steps" arises from the finite time-steps in which the whole period can be shared. during each time step, current direction does not change whereas current amplitude can increase or decrease in the coil. to better explain this operating principle, let us consider the action of one leg (phase) of the inverter, such as for example t1 and t4. transistor t1 is turned on at q = - 90and turned off at q =90 while t4 is turned on at q =90. when t1 is figure 3. inverter driver operating principle turned off, the current it was carrying is immediately diverted to the diode in parallel with t4. this diode re-circulates the instantaneous current of the winding until it decreases to zero. once the phase current reverses direction is carried by t4. in term of voltage it is easy to draw the pha- ses voltages by conceiving the transistors as switches. due to the triangular connection of the phases, each phase voltage depends by the status of two legs of the bridge. figure 4 shows one real phase star voltage and one phase current. six voltage steps are evident in the look like sine wave. the same happens in the other legs of the bridge in different times. this topology drives the windings for the whole period, avoiding the phase to be "floating" (six-steps continuous mode inverter). fuzzy controller ph 3 u t2 t3 t5 t6 t1 t2 t3 0 p /2 p 3 p /2 q = w t t1 t4 ph 1 v ph 2 w ? brushless motor fuzzy control by using st52x301 3/18
the aim of the control is to maintain the desired speed regardless of the applied load to the shaft. when a resistance torque is applied to the shaft, a reduction of the speed takes place. this implies an incre- ment in the wave period of the hall sensors signals and then a decrement of the sine frequency in the phases, to follow sensors information. in this case, the only way to lead the rotor at the previous speed is to increase the winding current in or- der to balance the load torque. fuzzy controller, in fig. 6, performs this task. st52x301 reads the speed figure 4. phase voltage and current figure 5. control topology speed_ref error fuzzy controller pwm motor driver speed ? AN1113 - application note 4/18
"ref" value from ad channel0 and the instantaneous hall signal period by means of a digital port. a software task performs the "error" calculation error = vref - speed . the variable " error " also forms the fuzzy input for the " fuzzy controller " block. a fuzzy algorithm uses three rules to compute the fuzzy-out, achieving an incremental variable to drive the inverter in real-time mode. this incremental method allows to manage the speed in a closed loop real-time control, since software task time is very short. the first rule is fully activated when "error" value is "neg", i.e. when vref < 1 2 3 74ls00 4 5 6 74ls00 in 1 br ushless motor h 1 h 2 v w u 10k sp eed re f 9 p1 10 p2 11 p3 12 p4 13 p5 14 p6 15 p7 16 r ea d y 17 p8 18 t es t 19 m a in 2 20 m a in 1 21 t r ia co u t 24 m o de 25 r eset 26 in t 27 t im er ou t 28 t r es 29 t c t rl 30 o sc ou t 31 o sc in 32 t c lk 33 rx d 37 t xd 36 a in 0 43 a in 1 42 a in 2 41 a in 3 40 bg 44 a v d d 2 a v ss 3 v p p 6 st 52x 301 bg v c c r pm v c c 1u f s1 r st 15k 10k t orq ue re f bg isen se h 3 20m h z pwm en a en b 6 11 in 1 9 10 8 74ls00 in 2 in 3 v pow 4 in 2 in 3 l 29 8 8 15 b 22p f in1 in2 in3 5 7 10 1 a 3.9 2w isen se 2.2u f 10k 22p f p0 figure 7. electrical schematic the real implemented system is shown in the schematic below. st52x301, the integrated full-bridge dual drive and three ands are enough to control the bldc motor. the basic idea used in this implementation employs the hall sensors in a direct way. the hall signals are "and-ed" directly with a pwm wave produced by st52x301 in order to supply the proper winding. in ? AN1113 - application note 6/18
fact, a high frequency pwm wave produces, in a coil, a voltage whose amplitude value is the mean va- lue of the square wave. the motor data sheet displayed in fig. 2, clearly shows that "u-w" phase must be supplied positive when sensor "h1" is high, "w-v" when sensor "h2" is high and so on. this is true because the triangular connection was preferred in the coils arrangement. and output is, then, a pulse train whose duration is the same of the hall signal. this pulses train is used to drive each leg of the bridge l298. l298 is a monolit hic dual full-bridge driver designed to accept standard ttl logic levels and drive induc- tive loads such as relays, solenoids, dc and stepping motors. enable input signals are available to allow a software protection. internal circuitry provides the appropriate dead-time in order to avoid a "cross-con- duction" along the leg. st52x301 provides, by means of an internal peripher al, a pwm wave that can be varied by software. st52x301 pwm frequency is chosen as compromise between acoustic noise in the motor and losses in the power stages of the bridge. a 19 khz wave frequency was used in the implemented application. software description before to discuss about st52x301 software configuration, it is important to note some hw connections in the schematic. bit "0" (pin 9) of the par allel port is used to enable the power stage only after power-on reset, then parallel port must be configured in out mode. the analog input ain0 (pin 43) is used to read the voltage reference. a voltage between 0 + 2.5 v present on this pin, is converted in the range 0 + 255. external interrupt pin (27) is used to read one hall sensor signal period in order to calculate the instan- taneous speed. this digital input will be configured both in negative or positive edge trigger to produce an internal software interrupt. fig. 8 displays how to configure a/d per ipheral with 3 inputs, triac peripheral in pwm mode at 19 khz, the used global variables. the following figure reports the main program in term of graphical programming. the appendix at the figure 8 . peripheral configuration ? brushless motor fuzzy control by using st52x301 7/18
figure 9 . main view end of this application note contains the whole assembler code generated by the compiler. let us discuss about the main program. " int_ad_on " and " init " blocks in fig. 9 are used to initialize global variables and interrupts mask (only ad int is enabled). the two following blocks start the converter and wait for the results of the conversion. after that, the converter values are stored in the variable called "speed, "torque", "current" and a new interrupt mask is enabled (only ext int). block " v200_duty " loads the triac counter with a default value and the block " pwm_start " allows the tri- ac peripheral to run. at this time it is already possible to see a pwm wave on pin 24 of st52x301. since pin 27 reads a time period related to the speed it is necessary to perform a mathematical inver- sion to achieve the frequency. just to simplify, a complementation of the period byte will be made in- stead of the inversion. in this way, an error will be introduced in the spin frequency calculation. if a more accurate precision is requested, an alternative method to implement the inversion is to use a fuzzy im- plementation of the function 1/t. the block "l298_en_on" enables the bridge driver. the block " complemnt " performs the above task. following the loop, a new value of the speed ref " torque_ref " and " current " are read. the block " max_research " catches the maximum value of the cur- rent during a turn of the shaft. this loop is performed until the condition "tmp>=2" is false. variable tmp is used to create a time inertia in the fuzzy control. "tmp" is incremented each time the ext-interrupt routi- ne is executed (each 1/3 turn of the shaft) and this implies a real time control in about one turn of the shaft. block " calc_err " performs error calculation as " error = speed - ref - s peed ", error variable is sent to the fuzzy input, fuzzy block " fuzzy controller " produces the incremental value " delta_dc ". next figure shows the content of the 5 mathematics blocks. in the second, "delta_dc" is added (or sub- tract, if negative) to the current duty-cycle before to refresh triac counter. the operators if .. then are in- troduced to avoid overflow or underflow in the counter registers during the control. key point in the program is the ext_int routine (fig. 11). this task performs the period measurement of ? AN1113 - application note 8/18
figure 10 . arithmetic blocks the square wave supplied by one hall sensor. the period is measured by counting the time between a positive edge and the following negative edge of the h2 sensor signal. a flag is used to select the edge. if the coming edge is positive, the timer peripheral will be started. if negative, the current timer counter value will be read and the timer stopped. before to escape from ext_int routine two assembler blocks will set the edge select mask in order to sense the proper next edge. figure 11. external interrupt routine ? brushless motor fuzzy control by using st52x301 9/18
conclusions and results by using st52x301 fuzzy controller it is easy to implement a real time control with few components.the brushless motor control described in this application note represents a good compromise between sy- stem costs and motor performances. the graphical programming environment reduces the development time also for not expert programmers. fig. 12 displays a phase current and the star voltage vu-o. pwm square wave is filtered by the osc illo- scope. from this picture it is possible to observe the six steps on the current wave that yields a distortion of the theoretical sine wave. at higher speed rates the distortion becomes lower, although at low speed, motor performance does not degrade. to evaluate acceleration characteristics and control goodness, some trials were made during the softwa- figure 12 . phase current re development. fig. 13 shows free acceleration characteristics starting from a given speed of the shaft to reach a double speed by changing suddenly the speed_ref. the dynamic performances of this system were compared, in term of speed and load response, with a traditional controller with six steps drive. no substantial differences were issued in the dynamic perfor- mances, but the costs of the traditional system was higher. ? AN1113 - application note 10/18
figure 13. dynamical performances references [1] paul c. krause "analysis of electric mac hinery" - mcgraw-hill [2] "power products- application manual", stmicroelectronics [3] mohan, undeland, robbins "power electronics: converters, applications and design" john wiley & sons [4] yasuhiko dote, sakan kinoshita "brushless servomotors - fundamentals and applications" oxford science publications [5] fuzzystudio ? 3.0 - user manual, stmicroelectronics, 1998 w 2w speed_ref motor speed tr = 150 ms ? brushless motor fuzzy control by using st52x301 11/18
appendix: st52x301 assembler code ; source file: c:\temp\bldc_cl.wcl ; compile time:mon sep 28 11:01:26 1998 ; device type: st52x301 ; compiler version: 01.00 (02.06.98) data 0 0 20 147 0 data 0 1 15 127 15 data 0 2 0 107 20 stop irq 3 timer_interrupt irq 4 triac_interrupt irq 1 ad_interrupt irq 2 sci_interrupt irq 0 external_interrupt stop @wclstart@@: ldcf 0 255 ldcf 1 4 ldcf 2 10 ldcf 3 0 ldcf 4 59 ldcf 5 15 ldcf 6 40 ldcf 7 8 ldcf 8 3 ldcf 9 0 ldcf 10 4 ldcf 11 0 ldcf 12 64 ldcf 13 0 ldcf 14 0 ldcf 15 228 start: int_ad_on: ldcf 14 2 init: ldrc 13 128 ldrc 14 128 ldrc 6 0 ldrc 11 0 ? AN1113 - application note 12/18
ldrc 15 100 ldrc 5 0 ad_start: ldcf 2 11 wait0: waiti rd_speed: ldri 12 0 rd_torque: ldri 8 1 rd_sense: ldri 7 2 stopad: ldcf 2 10 ext_on: ldcf 14 1 restart_ad: ldcf 2 11 v200_to_duty: mdgi ldrc 0 200 ldpr 1 0 megi pwm_start: ldcf 11 2 ldcf 10 7 l298_en_on: mdgi ldrc 0 1 ldpr 2 0 megi complemnt: mdgi ldrc 9 255 sub 9 15 megi rd_spee: ldri 12 0 rd_torq: ldri 8 1 rd_isense: ldri 7 2 ? brushless motor fuzzy control by using st52x301 13/18
max_reserch: mdgi ldrr 0 7 sub 0 5 megi jps @@00000 @00001: ldrr 5 7 @00000: @00002: tmp_3: mdgi ldrc 0 3 sub 0 6 megi jpz @@00004 jpns @@00003 @00004: jp calc_err jp @@00005 @00003: jp complemnt @00005: calc_err: mdgi ldrc 0 60 sub 0 12 megi jps @@00006 @00007: ldrc 12 60 @00006: @00008: mdgi ldrc 0 180 sub 0 12 megi jpz @@00010 jpns @@00009 @00010: ldrc 12 180 @00009: ? AN1113 - application note 14/18
@00011: ldrc 6 0 mdgi ldrr 10 12 subo 10 9 megi controller: ldrr 0 10 stop ldp 0 2 ldp 0 2 fzand con 117 ldp 0 1 ldp 0 1 fzand con 127 ldp 0 0 ldp 0 0 fzand con 137 out 0 stop ldri 13 9 torque_limit: mdgi ldrr 0 5 sub 0 8 megi jps @@00012 @00013: ldrc 13 128 @00012: @00014: ldrc 5 0 incr_duty: mdgi ldrc 0 128 add 14 13 add 14 0 megi mdgi ? brushless motor fuzzy control by using st52x301 15/18
ldrc 0 244 sub 0 14 megi jpz @@00016 jpns @@00015 @00016: ldrc 14 244 @00015: @00017: mdgi ldrc 0 11 sub 0 14 megi jps @@00018 @00019: ldrc 14 11 @00018: @00020: new_duty: ldpr 1 14 jp pwm_start external_interrupt: inv_flag: mdgi ldrc 0 1 add 11 0 megi mdgi ldrc 0 2 sub 0 11 megi jpz @@00022 jpns @@00021 @00022: ldrc 11 0 @00021: @00023: mdgi ldrc 0 1 add 6 0 megi flag_is1: ? AN1113 - application note 16/18
mdgi ldrc 0 1 sub 0 11 megi jpz @@00025 jpns @@00024 @00025: jp set_tim jp @@00026 @00024: jp get_rpm @00026: get_rpm: ldri 15 4 stop_tim: ldcf 6 40 on_rise: rint 0 ldcf 14 1 rint 0 iret0: reti set_tim: mdgi ldrc 0 255 ldpr 0 0 megi start_tim: ldcf 6 41 ldcf 6 43 on_fall: rint 0 ldcf 14 129 rint 0 jp iret0 ad_interrupt: iret2: reti sci_interrupt: iret1: reti timer_interrupt: ? brushless motor fuzzy control by using st52x301 17/18
iret4: reti triac_interrupt: iret3: reti stop information furnished is believed to be accurate and reliable. however, stmicroelectronics assumes no responsibility for the consequences of use of such information nor for any infringement of patents or other rights of third parties which may result from its use. no license is gran- ted by implication or otherwise under any patent or patent rights of stmicroelectronics. specification mentioned in t his publication are subject to change without notice. this publication supersedes and replaces all informat ion previously supplied. stmicroelectronics products are not authorized for use as critical components in life sup port devices or systems without express written approval of stmicroelectronics. the st logo is a registered trademark of stmicroelectronics ? 1999 stm icroelectronics C printed in italy C all rights reserved stmicroelectronics group of companies http://www.st.com aust ralia - brazil - canada - china - france - germany - i taly - japan - korea - malaysia - malta - mex ico - morocco - the netherlands - singapore - spain - sweden - switzerland - taiwan - thailand - united kingdom - u.s.a. ? AN1113 - application note 18/18


▲Up To Search▲   

 
Price & Availability of AN1113

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X